libkovan
1
The kovan standard library
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
camera.h
Go to the documentation of this file.
1
/**************************************************************************
2
* Copyright 2012 KISS Institute for Practical Robotics *
3
* *
4
* This file is part of libkovan. *
5
* *
6
* libkovan is free software: you can redistribute it and/or modify *
7
* it under the terms of the GNU General Public License as published by *
8
* the Free Software Foundation, either version 2 of the License, or *
9
* (at your option) any later version. *
10
* *
11
* libkovan is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU General Public License for more details. *
15
* *
16
* You should have received a copy of the GNU General Public License *
17
* along with libkovan. Check the LICENSE file in the project root. *
18
* If not, see <http://www.gnu.org/licenses/>. *
19
**************************************************************************/
20
21
#ifndef _CAMERA_H_
22
#define _CAMERA_H_
23
24
#include "
geom.h
"
25
#include "
export.h
"
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
31
typedef
struct
pixel
32
{
33
int
r
;
34
int
g
;
35
int
b
;
36
}
pixel
;
37
38
enum
Resolution
39
{
40
LOW_RES
,
41
MED_RES
,
42
HIGH_RES
,
43
NATIVE_RES
44
};
45
56
EXPORT_SYM
int
camera_open
(
enum
Resolution
res);
57
69
EXPORT_SYM
int
camera_open_device
(
int
number,
enum
Resolution
res);
70
77
EXPORT_SYM
int
camera_load_config
(
const
char
*name);
78
83
EXPORT_SYM
void
set_camera_width
(
int
width);
84
89
EXPORT_SYM
void
set_camera_height
(
int
height);
90
96
EXPORT_SYM
int
get_camera_width
(
void
);
97
103
EXPORT_SYM
int
get_camera_height
(
void
);
104
109
EXPORT_SYM
int
camera_update
(
void
);
110
116
EXPORT_SYM
pixel
get_camera_pixel
(
point2
p);
117
122
EXPORT_SYM
int
get_channel_count
(
void
);
123
130
EXPORT_SYM
int
get_object_count
(
int
channel);
131
139
EXPORT_SYM
const
char
*
get_object_data
(
int
channel,
int
object
);
140
145
EXPORT_SYM
int
get_code_num
(
int
channel,
int
object
);
146
152
EXPORT_SYM
int
get_object_data_length
(
int
channel,
int
object
);
153
158
EXPORT_SYM
double
get_object_confidence
(
int
channel,
int
object
);
159
163
EXPORT_SYM
int
get_object_area
(
int
channel,
int
object
);
164
168
EXPORT_SYM
rectangle
get_object_bbox
(
int
channel,
int
object
);
169
173
EXPORT_SYM
point2
get_object_centroid
(
int
channel,
int
object
);
174
178
EXPORT_SYM
point2
get_object_center
(
int
channel,
int
object
);
179
185
EXPORT_SYM
void
camera_close
();
186
191
EXPORT_SYM
void
set_camera_config_base_path
(
const
char
*
const
path);
192
199
EXPORT_SYM
const
unsigned
char
*
get_camera_frame_row
(
unsigned
row);
200
201
EXPORT_SYM
const
unsigned
char
*
get_camera_frame
();
202
203
EXPORT_SYM
unsigned
get_camera_element_size
();
204
205
#ifdef __cplusplus
206
}
207
#endif
208
209
210
#endif
include
kovan
camera.h
Generated on Mon Aug 19 2013 00:33:00 for libkovan by
1.8.4